<?php
/**
 * callback for accounting/transaction/add
 */
function acctg_transaction_add(){
	
}

/**
 * callback for accounting/account/get
 */
function acctg_account_get(){
	$acct = array();
	if(isset($_POST["id"])){
		$acct = Accounting::get_instance()->get_account($_POST["id"]);
	}
	return $acct;
}

/**
 * callback for accounting/accounts/get
 */
function acctg_accounts_get(){
	$accts = array();
	if(isset($_POST["like"])){
		$accts = Accounting::get_instance()->get_accounts($_POST["like"]);
	}
	return drupal_json($accts);
}